﻿using WeDonekRpc.Helper;

namespace Shop.RemoteModel.AdvertPlace.Model
{
    public class PlaceImageSet
    {
        /// <summary>
        /// 最小宽度
        /// </summary>
        public int? MinWidth
        {
            get;
            set;
        }

        /// <summary>
        /// 最小高度
        /// </summary>
        public int? MinHeight
        {
            get;
            set;
        }
        /// <summary>
        /// 最大宽度
        /// </summary>
        public int? MaxWidth
        {
            get;
            set;
        }

        /// <summary>
        /// 最大高度
        /// </summary>
        public int? MaxHeight
        {
            get;
            set;
        }
        /// <summary>
        /// 宽高比例
        /// </summary>
        public int[] Ratio
        {
            get;
            set;
        }
        public bool IsNull ()
        {
            return this.Ratio.IsNull() &&
                !this.MaxWidth.HasValue &&
                !this.MaxHeight.HasValue &&
                !this.MinHeight.HasValue &&
                !this.MinWidth.HasValue;
        }
    }
}
